package com.cloudlinkscm.base.filecenter.service;

import com.cloudlinkscm.base.filecenter.model.dto.*;
import com.cloudlinkscm.loms.framework.core.pojo.RestfulApiResponse;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.Map;

/**
 * @author : tac
 * @date : 2017/7/21
 */
public interface FileRemoteService {
    String PATH = "file";
    String DOWNLOAD_ACTION = "download";

    @RequestMapping(value = "url/documents", method = RequestMethod.GET)
    RestfulApiResponse<Map<String, String>> documentUrls(DownloadRequestDto dto);

    @RequestMapping(value = "url/images", method = RequestMethod.GET)
    RestfulApiResponse<Map<String, String>> imageUrls(DownloadRequestDto dto);

    @RequestMapping(value = "upload/document", method = RequestMethod.PUT)
    RestfulApiResponse<String> uploadDocument(MultipartFile file, DocumentUploadDto args);

    @RequestMapping(value = "upload/image", method = RequestMethod.PUT)
    RestfulApiResponse<String> uploadImage(MultipartFile file, ImageUploadDto args);

    @RequestMapping(value = "delete", method = RequestMethod.DELETE)
    RestfulApiResponse<Integer> delete(DeleteRequestDto dto);
}
